feat: use service account for tiled insertion#1398
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1398 +/- ##
=======================================
Coverage 95.16% 95.17%
=======================================
Files 43 43
Lines 3080 3107 +27
=======================================
+ Hits 2931 2957 +26
- Misses 149 150 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a7cd2c8 to
224862a
Compare
tpoliaw
left a comment
There was a problem hiding this comment.
Running plans seems to work ok but I'm getting a 500 Internal Server Error when trying to access tiled through its docs UI.
Not sure if it's a bug on our side or theirs but from the tiled logs it's coming from the dls.py module
[...]
tiled-1 | File "/app/lib/python3.12/site-packages/tiled/server/router.py", line 329, in search
tiled-1 | entry = await get_entry(
tiled-1 | ^^^^^^^^^^^^^^^^
tiled-1 | File "/app/lib/python3.12/site-packages/tiled/server/dependencies.py", line 49, in get_entry
tiled-1 | entry = await filter_for_access(
tiled-1 | ^^^^^^^^^^^^^^^^^^^^^^^^
tiled-1 | File "/app/lib/python3.12/site-packages/tiled/server/utils.py", line 104, in filter_for_access
tiled-1 | await access_policy.allowed_scopes(
tiled-1 | File "/app/lib/python3.12/site-packages/tiled/access_control/access_policies.py", line 562, in allowed_scopes
tiled-1 | self.build_input(
tiled-1 | File "/deploy/config/dls.py", line 101, in build_input
tiled-1 | principal.type is PrincipalType.external
tiled-1 | ^^^^^^^^^^^^^^
tiled-1 | AttributeError: 'NoneType' object has no attribute 'type'
| diamond-policies: | ||
| service: ghcr | ||
| resource: ghcr.io/diamondlightsource/authz-policy:0.0.18 | ||
| resource: ghcr.io/zohebshaikh/authz-policy:0.2.2 |
There was a problem hiding this comment.
This should wait for the authz update before it's merged
|
When running a plan with an unexpected instrument session, eg |
Try going to localhost:4181 for tiled authenticated access |
The service account only has permission for proposal 1 so this looks correct to me |
Sure but I'd expect a
I think I've misunderstood the premise here. I thought the service account could write anything. |
|
The service account can only write data for a particular beamline or particular proposal or some sessions and these permissions can set here The 500 error , I has been fixed |
|
Create issue for the security vulnerability #1412 |
AuthZ Changes